#include <iostream>
#include <string>
using namespace std;
int n;
string s;
void maketree (int l, int r) {
	if (r > l) {
		int mid = (l + r) / 2;
		maketree (l, mid);
		maketree (mid + 1, r);
	}
	bool B = 1, I = 1;
	for (int i = l; i <= r; i++) {
		if (s[i] == '0') {
			I = 0;
		} else {
			B = 0;
		}
	}
	if (B) {
		cout << 'B';
	} else if (I) {
		cout << 'I';
	} else {
		cout << 'F';
	}
}
int main() {
	cin >> n >> s;
	maketree (0, s.size() - 1);
	return 0;
}
